<!--{include file='admin/public/header.html'}-->
<script type="text/javascript">
$(function(){
	$("#addLinkFrom").validationEngine();
	$("input[name=type]").change(function(){
		
		var html = "<td>logo地址</td>"
            +"<td>"
            +"<input name='logourl' class='validate[required,custom[url]]' class='span4' type='text' value=''  />"
            +"</td>";
		if($("input[name=type]:checked").val() == 2){
			
			$("#logourl").html(html);
			$("#logourl").show();
		}else{
			$("#logourl").hide();
			$("#logourl").html('');
		}
		
	});
	
})
</script>
     <div class="content">
        <div class="page-header">
          <h3 class="fl">增加友情链接</h3>
          <div class="user_message fr"><i class="icon-wrench"></i>增加您的友情链接</div>
          <div class="cl"></div>
        </div>
        <form id="addLinkFrom" class="form-inline" action="" method="post">
        <table class="table set_table">
          <thead>
            <tr>
              <th width="11%" >功 能</th>
              <th >配 置</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>所属栏目</td>
              <td>
              <select class="validate[required]"  class="span3 parentCate " name="cateid"  >
             <!--{foreach from=$cate key=k item=v}-->
                <optgroup label="<!--{$v.categoryname}-->"><!--{$v.categoryname}--></option>
                <!--{foreach from=$v.items key=ik item=iv}-->
                <option value="<!--{$iv.id}-->"  type="<!--{$iv.type}-->" ><!--{$iv.categoryname}--></option>
                <!--{/foreach}-->
            <!--{/foreach}-->
              </select>
              </td>
            </tr>
            <tr>
              <td>友链类型</td>
              <td>
              <input name="type" type="radio" value=1  checked="checked"/><span>文字</span>
              <input name="type" type="radio" value=2 /><span>图片</span>
              </td>
            </tr>
            <tr id="logourl" style="display:none">
            </tr>
            <tr>
              <td>友链名称</td>
              <td>
              <input class="validate[required]" class="span4" name="linkname" id="cl_name" type="text" x-webkit-speech />
               <span class="m1em_t">排序</span>
              <input class="span1" name="sort" type="text" />
              </td>
            </tr>
            <tr>
              <td>友链地址</td>
              <td>
              <input class="validate[required,custom[url]]" class="span4" name="linkurl" id="cl_name" type="text" x-webkit-speech />
              </td>
            </tr>
            
          </tbody>
        </table>
         <p class="border_top"> 
         <input type="submit" value="添加" class="btn btn-primary btn-small input-small" />
         </p>
        </form>
       
  </div>
<!--{include file='admin/public/footer.html'}-->